﻿using IBLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using model;

namespace WebApi110zy.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class MemberController : ControllerBase
    {
        public MemberController(IMemberBLL bll)
        {
            Bll = bll;
        }
       
        public IMemberBLL Bll { get; }
        [HttpPost("Add")]
        public int Add(member m)
        {
            return Bll.Add(m);
        }
        [HttpGet("Show")]
        public List<member> Show()
        {
            return Bll.Show();
        }
        [HttpDelete("Delete")]
        public int Delete(int id)
        {
            return Bll.Delete(id);
        }
        [HttpGet("Fantian")]
        public member Fantian(int id)
        {
            return Bll.Fantian(id);
        }
        [HttpPut("Update")]
        public int Update(member m)
        {
            return Bll.Update(m);
        }






    }
}
